Skip to content

Highlight swap source slots in dashboard editor#658

Merged
multiplex55 merged 1 commit intomasterfrom
codex/add-per-slot-swap-action-to-dashboard-editor
Jan 8, 2026
Merged

Highlight swap source slots in dashboard editor#658
multiplex55 merged 1 commit intomasterfrom
codex/add-per-slot-swap-action-to-dashboard-editor

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Improve the UX of the dashboard slot swap flow by clearly indicating which slot is the current swap source.
  • Preserve existing swap semantics where the first chosen slot becomes the source and the second choice triggers the swap of slot data.
  • Make it easy to cancel a pending swap by toggling the source again.

Description

  • Updated src/gui/dashboard_editor_dialog.rs to render the per-slot swap button with a distinct filled color when self.swap_anchor == Some(idx) so the source is visually highlighted.
  • Changed the displayed label from "Swap" to "Swap source" for the active source and used ui.add(...) with egui::Button::fill(egui::Color32::from_rgb(60,120,200)) to provide color feedback.
  • Kept existing swap behavior that calls swap_slots(...) to exchange widget, settings, and id between slots and resets self.swap_anchor after a swap or cancel.
  • No changes were made to the swap_slots validation or swapping logic itself.

Testing

  • No automated tests were run for this change.

Codex Task

@multiplex55 multiplex55 merged commit bc830ff into master Jan 8, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/add-per-slot-swap-action-to-dashboard-editor branch January 9, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant